<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../../vue.js"></script>
</head>

<body>
    <!-- 创建容器 -->
    <div id="app">
        <!-- 插值语法,数据保存在data或者直接保存在实例vm上 -->
        <h1>{{title}}</h1>
        <h1>{{count}}</h1>
        <h1>{{boolean}}</h1>
        <h1>{{obj.name}}</h1>
        <h1>{{arr[0]}}</h1>
        <h1>{{sy}}</h1>
    </div>
    <script>
        //实例化一个vm,Vue是MVVM模型中的核心
        //Vue是一个构造函数 使用时需实例化
        const vm = new Vue({
            // el:string | selector
            el: "#app",
            // data:Object|function
            data() {
                return {
                    title: "vue",
                    count: 1,
                    boolean: "true",
                    obj: {
                        name: "张三",
                        age: 18,
                        hobby: "吃喝玩乐"
                    },
                    arr: [1,4,7,9],
                    sy: Symbol()
                }
            }
        })

        console.log(vm);

    </script>
</body>

</html>